﻿@model App.MVCClient.Models.AddressIndex
@{
    ViewBag.Title = "Address List";
}
<h2>
    Address List</h2>
<br />
<div class="commonPanel actionPanel">
    @using(@Html.BeginForm("Index", "Address", FormMethod.Get))
    {
        @Html.TextBoxFor(m => m.AddressTypeFilter, new { placeholder = "Address Type", type="search" })
        @Html.TextBoxFor(m => m.DomainIdFilter, new { placeholder = "Domain ID", type = "search" })
        <input type="submit" class="actionLink" value="Filter" />
    }
</div>
<div class="commonPanel resultSetPanel">
    <table>
        <thead>
            <tr>
                <th>
                    Address Line 1
                </th>
                <th>
                    Address Line 2
                </th>
                <th>
                    City
                </th>
                <th>
                    Country
                </th>
                <th>
                    State/Province
                </th>
                <th>
                    Postal Code
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model.AddressList)
            {
                <tr>
                    <td>@item.AddressLine1
                    </td>
                    <td>@item.AddressLine2
                    </td>
                    <td>@item.City
                    </td>
                    <td>@item.CountryCode
                    </td>
                    <td>@item.StateProvinceCode
                    </td>
                    <td>@item.PostalCode
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
<div class="commonPanel actionPanel">
    @Html.ActionLink("Create New", "Create", new { controller = "Address" })
    @Html.ActionLink("Refresh", "Index", new { controller = "Address" })
</div>
